package com.adui.mgt.performance.service;

import com.adui.mgt.performance.common.Result;
import com.adui.mgt.performance.entity.Course;
import com.adui.mgt.performance.entity.Subject;
import com.adui.mgt.performance.mapper.CourseMapper;
import com.adui.mgt.performance.service.base.impl.BaseServiceImpl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.springframework.stereotype.Service;

@Service
public class CourseService extends BaseServiceImpl<CourseMapper, Course> {

    public Result findPage(Course course) {

        LambdaQueryWrapper<Course> queryWrappers = new LambdaQueryWrapper<>(course);
        return Result.data(this.page(new Page<>(course.getPageNum(), course.getPageSize()), queryWrappers));
    }
}
